import MySQLdb
import sys
import time

try:
	conn = MySQLdb.connect(host='localhost',user='root',passwd='gemj820812',db='shumi')
except:
	sys.exit()

cursor = conn.cursor()

now = time.strftime("%Y-%m-%d")

sql = "insert into novel_catch(title, classname, url, author, uptime, state) values ('%s','%s', '%s', '%s', '%s', %d)" % ('test', 'shuji', 'aaaaaaa', 'big', now,1)
print sql

try:

	cursor.execute(sql)
	print '111'

except:
	sys.exit()
print '222'

cursor.close()

conn.close()
